import http from '@/utils/http'

//验证码
export function getValidateCodeAPI () {
  return http({
    url: 'admin/validate-code'
  })
}
//账密登录
export function loginAPI({ phone, password}) {
  console.log('请求传参:'+phone+','+password)
  return http({
    url: 'staff-merchant/login',
    method: 'POST',
    data: {
      phone: phone,
      password: password
    }
  })
}
//人脸登录
export  function loginByFaceApi(faceBase64:String){
  console.log('loginByFaceApi请求传参:'+faceBase64)
  return http({
    url: 'staff-merchant/login-by-face',
    method: 'POST',
    data:faceBase64
  })

}
//人脸注册
export  function registerByFaceApi(faceBase64:String,staffId:String){
  console.log('registerByFaceApi请求传参:'+faceBase64)
  return http({
    url: 'staff-merchant/register-by-face/'+staffId,
    method: 'POST',
    data:faceBase64
  })
}
 
//判断登录状态

export  function isLoggingApi(){
  return http({
    url: 'staff-merchant/is-logging',
    method: 'POST',
  })

}
